gtk4.git
9 years agolistbox: Don't compare int to uint
Timm Bäder [Sat, 16 Apr 2016 11:57:08 +0000 (13:57 +0200)]
listbox: Don't compare int to uint

9 years agocolorbutton: Stop using state-changed
Timm Bäder [Wed, 11 May 2016 13:33:18 +0000 (15:33 +0200)]
colorbutton: Stop using state-changed

9 years agotoolbar: Limit item position to number of contained elements
Timm Bäder [Tue, 10 May 2016 17:16:19 +0000 (19:16 +0200)]
toolbar: Limit item position to number of contained elements

Greater values don't make much sense.

https://bugzilla.gnome.org/show_bug.cgi?id=682080

9 years agowayland: Avoid unitialized memory reads
Matthias Clasen [Thu, 12 May 2016 15:37:13 +0000 (11:37 -0400)]
wayland: Avoid unitialized memory reads

I didn't pay attention when I replaced g_new0 with g_newa. Oops.

9 years agoAdwaita: brighter pushed button background
Lapo Calamandrei [Thu, 12 May 2016 09:50:13 +0000 (11:50 +0200)]
Adwaita: brighter pushed button background

providing more contrast with the text color.

9 years agoAdwaita: bold size label on font button
Lapo Calamandrei [Thu, 12 May 2016 09:45:34 +0000 (11:45 +0200)]
Adwaita: bold size label on font button

looks more consistent with other special buttons with icons.

9 years agoAdwaita: hide separator on button.font and button.file
Lapo Calamandrei [Thu, 12 May 2016 09:40:28 +0000 (11:40 +0200)]
Adwaita: hide separator on button.font and button.file

we used to do that, got missed at some point during 3.20 cycle.

9 years agoDocs: Clarify life cycle issue
Matthias Clasen [Wed, 11 May 2016 17:25:15 +0000 (13:25 -0400)]
Docs: Clarify life cycle issue

gtk_gesture_get_last_event() wasn't very clear about how long
it is safe to use the returned pointer.

9 years agoDND: Avoid a use-after-free
Matthias Clasen [Wed, 11 May 2016 17:24:04 +0000 (13:24 -0400)]
DND: Avoid a use-after-free

Cancelling the gesture causes the last_event pointer to become
invalid. Make a copy of the event so we can keep using it
regardless of the gesture state.

9 years agoplaces sidebar: Avoid markup confusion in tooltips
Matthias Clasen [Wed, 11 May 2016 01:47:20 +0000 (21:47 -0400)]
places sidebar: Avoid markup confusion in tooltips

At one point, the sidebar was using gtk_treeview_set_tooltip_column,
which expects tooltips to be markup. With the listbox-based sidebar,
we don't do that anymore. So don't escape the tooltip text.

https://bugzilla.gnome.org/show_bug.cgi?id=766175

9 years agox11: Trap possible X error
Matthias Clasen [Wed, 11 May 2016 01:29:10 +0000 (21:29 -0400)]
x11: Trap possible X error

XIGetClientPointer can generate X errors (e.g. when the X server
does not support XI2. Trap them and carry on.

https://bugzilla.gnome.org/show_bug.cgi?id=766233

9 years agoFix scale length
Matthias Clasen [Tue, 10 May 2016 19:41:03 +0000 (15:41 -0400)]
Fix scale length

The vertical scales should really be of the same length, so
add an empty value to be drawn by the other scale.

9 years agoForgotten rename
Matthias Clasen [Tue, 10 May 2016 19:31:29 +0000 (15:31 -0400)]
Forgotten rename

9 years agoScale: Set the correct value alignment
Timm Bäder [Tue, 10 May 2016 16:33:37 +0000 (18:33 +0200)]
Scale: Set the correct value alignment

We're measuring both the width of the minimal and the maximal value for
the value gadget, but only give the value the minimal width for its
current value, resultnig in an always left-aligned value.

Fix this by assigning the width of the value gadget to the value layout
and letting pango align the text inside the layout.

https://bugzilla.gnome.org/show_bug.cgi?id=766120

9 years agowidget-factory: Let one of the scales draw a value
Timm Bäder [Mon, 9 May 2016 16:30:14 +0000 (18:30 +0200)]
widget-factory: Let one of the scales draw a value

https://bugzilla.gnome.org/show_bug.cgi?id=766120

9 years agoDocument new api
Matthias Clasen [Tue, 10 May 2016 19:22:35 +0000 (15:22 -0400)]
Document new api

9 years agoMake gdk_event_get_pointer_emulated public
Matthias Clasen [Tue, 10 May 2016 19:16:45 +0000 (15:16 -0400)]
Make gdk_event_get_pointer_emulated public

There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.

9 years agogtkmenu: ignore left/right scroll events
Olivier Fourdan [Mon, 9 May 2016 06:56:56 +0000 (08:56 +0200)]
gtkmenu: ignore left/right scroll events

Menus are placed vertically by definition, it does not make much sense
to support horizontal axis for scrolling.

Use GDK_EVENT_STOP/GDK_EVENT_PROPAGATE instead of TRUE/FALSE and add a
default case to return GDK_EVENT_PROPAGATE for unhandled events.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agogtkmenu: ignore emulated scroll events
Olivier Fourdan [Tue, 3 May 2016 14:44:14 +0000 (16:44 +0200)]
gtkmenu: ignore emulated scroll events

On X11, we get both smooth and emulated scroll events, whereas other
backends such as wayland will give smooth events only with touchpad
scrolling.

Discard emulated scroll events so that we get consistent behaviours
between backends.

Allow for both horizontal and vertical smooth events for scrolling so
that horizontal scrolling still works without emulated scroll events as
well, again for consistency between gdk backends.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agogdkevent: make _gdk_event_get_pointer_emulated() private
Olivier Fourdan [Tue, 3 May 2016 14:15:07 +0000 (16:15 +0200)]
gdkevent: make _gdk_event_get_pointer_emulated() private

And not just internal to gdk, so we can use it in gtk as well, to
differentiate emulated scroll events from others.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agoscale: Remove double nullable annotation
Timm Bäder [Tue, 10 May 2016 10:50:42 +0000 (12:50 +0200)]
scale: Remove double nullable annotation

Being both (allow-none) and (nullable) at the same time is a bit much.
Was from 591e7f5ef8538982e227b2c2cefc536a33cafa6c.

9 years agowidget: Add Since annotation to gtk_widget_queue_allocate
Timm Bäder [Tue, 10 May 2016 10:31:56 +0000 (12:31 +0200)]
widget: Add Since annotation to gtk_widget_queue_allocate

9 years agoGTK: Fix build for pre-C99 compilers
Chun-wei Fan [Mon, 9 May 2016 08:37:39 +0000 (16:37 +0800)]
GTK: Fix build for pre-C99 compilers

Some compilers we support, such as pre-2013 Visual Studio, does not support
for INIFINITY, log2() and exp2(), so check for exp2() and log2() during
configure, and use fallbacks for them and INIFINTY if they are not found.

https://bugzilla.gnome.org/show_bug.cgi?id=766207

9 years agoVisual Studio builds: Refine "installation" process
Chun-wei Fan [Tue, 10 May 2016 05:18:23 +0000 (13:18 +0800)]
Visual Studio builds: Refine "installation" process

Split out the part where we generate/update the caches for the GSchemas
and the icons, so that it is easier to ensure that things continue to
function correctly when we have GlibEtcInstallRoot != CopyDir.

9 years agoscrolledwindow: Remove child before destroying self
Benjamin Otte [Mon, 9 May 2016 22:59:19 +0000 (00:59 +0200)]
scrolledwindow: Remove child before destroying self

Children tend to call back into the scrolled window while being removed
and that doesn't work too well if the scrolled window is destroyed
already as Christian Hergert found out.

9 years agocssimage: Make it possible to shrink builtin check/optionmarks
Benjamin Otte [Mon, 9 May 2016 22:58:50 +0000 (00:58 +0200)]
cssimage: Make it possible to shrink builtin check/optionmarks

... below 7px of size.

9 years agoUpdated Occitan translation
Cédric Valmary [Mon, 9 May 2016 20:49:18 +0000 (20:49 +0000)]
Updated Occitan translation

9 years agodocs: Update examples of matching key bindings
Emmanuele Bassi [Mon, 9 May 2016 11:45:34 +0000 (12:45 +0100)]
docs: Update examples of matching key bindings

The selector for matching GtkEntry has changed to `entry` after 3.20.

https://bugzilla.gnome.org/show_bug.cgi?id=766166

9 years agogdk/Makefile.am: Dist gdkmonitorprivate.h
Chun-wei Fan [Mon, 9 May 2016 07:42:37 +0000 (15:42 +0800)]
gdk/Makefile.am: Dist gdkmonitorprivate.h

This file needs to be distributed with the tarball as well...

9 years agoVisual Studio builds: Clean up projects a bit
Chun-wei Fan [Mon, 9 May 2016 07:35:26 +0000 (15:35 +0800)]
Visual Studio builds: Clean up projects a bit

Consolidate the .lib's that we need to link to for GDK and GTK+ into the
property sheets, and also link to setupapi.lib as that is needed by
the port to the new GdkMonitor API.

9 years agogdk/win32/gdkmonitor-win32.c: Fix build on non-GCC
Chun-wei Fan [Mon, 9 May 2016 05:14:01 +0000 (13:14 +0800)]
gdk/win32/gdkmonitor-win32.c: Fix build on non-GCC

WINBOOL is MinGW-specific, so change it to BOOL, which is universally
available.

Also, Visua Studio is more picky on where __stdcall (WINAPI) is placed, so
fix that to be in-sync with what is done in the other sources.

9 years agoplacesview: update guiding list of protocols
Georges Basile Stavracas Neto [Sun, 8 May 2016 20:36:26 +0000 (17:36 -0300)]
placesview: update guiding list of protocols

The previous list of protocols in the guidance popover
was suboptimal and needed adjustments.

This commit updates this list to match the latest mockups [1].

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/4847c79ea1aaf75046b3ec5bb1b167ac604d86ed/nautilus/nautilus-next/connect-to-server-wire.png

https://bugzilla.gnome.org/show_bug.cgi?id=756570

9 years agodialogs: remove 2px border width again
Timm Bäder [Sun, 8 May 2016 19:33:53 +0000 (21:33 +0200)]
dialogs: remove 2px border width again

9 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 8 May 2016 15:30:49 +0000 (18:30 +0300)]
Updated Lithuanian translation

9 years agoUpdated Brazilian Portuguese translation
Rafael Fontenelle [Sun, 8 May 2016 14:25:31 +0000 (14:25 +0000)]
Updated Brazilian Portuguese translation
(cherry picked from commit 207b793316a90faff00d5ea6fbe483d5a184d066)

9 years agotooltip: Include gtkwidgetprivate.h
Timm Bäder [Sun, 8 May 2016 13:52:56 +0000 (15:52 +0200)]
tooltip: Include gtkwidgetprivate.h

That's where gtk_widget_query_tooltip is defined.

9 years agogdk: Fix parameter name mismatch
Timm Bäder [Sun, 8 May 2016 13:34:28 +0000 (15:34 +0200)]
gdk: Fix parameter name mismatch

9 years agoinfobar: Fix typo
Timm Bäder [Mon, 2 May 2016 06:59:40 +0000 (08:59 +0200)]
infobar: Fix typo

Style class names are prefixed with a '.'

9 years agogtk-demo: Fix revealer demo
Matthias Clasen [Sat, 7 May 2016 20:22:13 +0000 (16:22 -0400)]
gtk-demo: Fix revealer demo

This only used by luck before. We are changing a property from the
::notify handler for that property. Now that GtkRevealer is notifying
the property when it stops animations on unmap, we end up in a life
lock situation where we never make it out of the notify queue.

Fix this by not restarting the animation if the widget is unmapped.

9 years agowidget: add missing detail to ::query-tooltip emission
Ray Strode [Sat, 7 May 2016 02:29:31 +0000 (22:29 -0400)]
widget: add missing detail to ::query-tooltip emission

This was an oversight in commit dfb368e29bb58b4313b578f0ce75cfc8ead9a1.

9 years agotooltip: Add a missing *
Matthias Clasen [Sat, 7 May 2016 00:51:25 +0000 (20:51 -0400)]
tooltip: Add a missing *

This was an oversight in the previous commit.

9 years agogtk3-demo: Add a close button to the markup window
Matthias Clasen [Sat, 7 May 2016 00:50:38 +0000 (20:50 -0400)]
gtk3-demo: Add a close button to the markup window

9 years agogtk-demo: Don't duplicate text in markup example
Matthias Clasen [Sat, 7 May 2016 00:47:49 +0000 (20:47 -0400)]
gtk-demo: Don't duplicate text in markup example

I forgot to clear the buffer before inserting the new markup. Oops.

9 years agorevealer: emit notify::child-revealed when animation stops
Matthieu Gautier [Wed, 4 May 2016 10:42:40 +0000 (12:42 +0200)]
revealer: emit notify::child-revealed when animation stops

Depending of float rounding during target calculation, the size of the
GtkRevealer can be set to zero will the animation is not finished.
If the GtkRevealer is in a GtkPaned, it will be hidden and so the animation
will be stopped before it is finished.

In this case, force the emission of the child-revealed signal to let
client code know the animation is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=765973

9 years agoSimplify our templates
Matthias Clasen [Fri, 6 May 2016 17:45:46 +0000 (13:45 -0400)]
Simplify our templates

This is applying the new property name simplification.

9 years agoClean up builder parser data after parsing
Matthias Clasen [Fri, 6 May 2016 17:45:09 +0000 (13:45 -0400)]
Clean up builder parser data after parsing

No need to have these linger around in qdata.

9 years agobuilder tool: Canonicalize property names
Matthias Clasen [Fri, 6 May 2016 17:42:30 +0000 (13:42 -0400)]
builder tool: Canonicalize property names

When simplifying, convert property names to canonical form,
so we don't waste time while looking them up later.

9 years agoUpdated Occitan translation
Cédric Valmary [Fri, 6 May 2016 18:31:42 +0000 (18:31 +0000)]
Updated Occitan translation

9 years agoAdwaita: darken treeview exapanders
Lapo Calamandrei [Fri, 6 May 2016 17:34:12 +0000 (19:34 +0200)]
Adwaita: darken treeview exapanders

9 years agoAdwaita: cosmetic change
Lapo Calamandrei [Fri, 6 May 2016 17:01:19 +0000 (19:01 +0200)]
Adwaita: cosmetic change

9 years agoAdwaita: relocate a selector
Lapo Calamandrei [Fri, 6 May 2016 16:50:37 +0000 (18:50 +0200)]
Adwaita: relocate a selector

relocate treview acceleditor > label in the treeview section and
add a comment for a testcase.

9 years agoAvoid emitting ::style-set by name
Matthias Clasen [Fri, 6 May 2016 14:12:14 +0000 (10:12 -0400)]
Avoid emitting ::style-set by name

GtkStyle is deprecated, but we still emit ::style-set quite
a bit, so lets at least not be slow while doing it.

9 years agoDon't emit ::query-tooltip by name
Matthias Clasen [Fri, 6 May 2016 13:54:24 +0000 (09:54 -0400)]
Don't emit ::query-tooltip by name

This signal is emitted quite a bit, and we can easily avoid it.

9 years agoStop storing has-tooltip in qdata
Matthias Clasen [Fri, 6 May 2016 13:38:18 +0000 (09:38 -0400)]
Stop storing has-tooltip in qdata

This is queried quite a bit, and we have room for an extra
bit in GtkWidgetPrivate.

9 years agoDon't use qdata for getting the default css style
Matthias Clasen [Fri, 6 May 2016 11:54:22 +0000 (07:54 -0400)]
Don't use qdata for getting the default css style

There's no point in using qdata for looking this up, since
we only ever set it on the default screen anyway.

9 years agoAdwaita: tidy treeview style properties...
Lapo Calamandrei [Fri, 6 May 2016 13:36:26 +0000 (15:36 +0200)]
Adwaita: tidy treeview style properties...

...removing a double definition in the process.

9 years agosettings: Fix font names *again*
Matthias Clasen [Fri, 6 May 2016 11:08:56 +0000 (07:08 -0400)]
settings: Fix font names *again*

This is the last time, I hope.

9 years agowidget: Store accessible in GtkWidgetPrivate
Matthias Clasen [Fri, 6 May 2016 10:42:43 +0000 (06:42 -0400)]
widget: Store accessible in GtkWidgetPrivate

Every widget may have one of these, and they are accessed somewhat
frequently.

9 years agoEnsure we initialize a quark first
Matthias Clasen [Fri, 6 May 2016 04:46:17 +0000 (00:46 -0400)]
Ensure we initialize a quark first

The style function here can also be called before the corresponding
class_init had a chance to create the quark. Fix this.

9 years agotooltip: Ensure our quark is not 0
Matthias Clasen [Fri, 6 May 2016 04:45:05 +0000 (00:45 -0400)]
tooltip: Ensure our quark is not 0

Many of the tooltip functions can be called before a tooltip
object is created, and thus initializing the quark in class_init
is not good enough.

9 years agoUse a cheaper way to store settings per display
Matthias Clasen [Fri, 6 May 2016 04:21:08 +0000 (00:21 -0400)]
Use a cheaper way to store settings per display

This was another very frequent use of qdata. Since we typically
have only one or two display objects, storing the display-settings
association in a simple array is faster than using object data
or a hash table.

9 years agoUse a cheaper way to store debug flags
Matthias Clasen [Thu, 5 May 2016 22:51:30 +0000 (18:51 -0400)]
Use a cheaper way to store debug flags

This was the most frequent use of qdata *by far*.

9 years agoFix indentation mishap
Matthias Clasen [Thu, 5 May 2016 23:21:27 +0000 (19:21 -0400)]
Fix indentation mishap

9 years agoFix a typo
Matthias Clasen [Thu, 5 May 2016 23:17:31 +0000 (19:17 -0400)]
Fix a typo

9 years agowayland: use g_signal_handler_disconnect()
Christian Hergert [Fri, 6 May 2016 08:31:41 +0000 (11:31 +0300)]
wayland: use g_signal_handler_disconnect()

Use of g_signal_handlers_disconnect_by_func() needs to do more work than
necessary to find all the matching handlers. Instead, just hold on to the
signal identifier and remove it directly so we hit the fast path.

Not terribly ground breaking in terms of performance gains, but its done
enough to be worthwhile.

https://bugzilla.gnome.org/show_bug.cgi?id=766049

9 years agoUpdate color name css style test
Matthias Clasen [Thu, 5 May 2016 19:37:21 +0000 (15:37 -0400)]
Update color name css style test

Verify rebeccapurple too.

9 years agoscale: Fix mark positioning at the left/top edge
Matthias Clasen [Thu, 5 May 2016 19:17:56 +0000 (15:17 -0400)]
scale: Fix mark positioning at the left/top edge

We were failing to take the widget allocation.x/y into account
when deciding whether we need to push in the mark.

https://bugzilla.gnome.org/show_bug.cgi?id=765922

9 years agoGeneralize the previous commit
Matthias Clasen [Thu, 5 May 2016 18:13:03 +0000 (14:13 -0400)]
Generalize the previous commit

Update all xsettings when we get a screen, to prevent similar
problems from occurring in the future.

9 years agosettings: Avoid a crash
Matthias Clasen [Thu, 5 May 2016 17:30:55 +0000 (13:30 -0400)]
settings: Avoid a crash

Christian Hergert reported seeing webkit crashes with recent
GTK+. The stacktrace points at the CSS machinery calling into
GtkSettings to get the font name, and then getting surprised
by a property notification that triggers style validation.

To avoid this, query the font name xsetting right away when
we get set a screen.

9 years agox11: Rely on passive keyboard grabs with XI2 for DnD
Carlos Garnacho [Thu, 5 May 2016 17:00:28 +0000 (19:00 +0200)]
x11: Rely on passive keyboard grabs with XI2 for DnD

The active keyboard grab can be spared then. This way the passive
key grabs allow other key combinations (eg. alt-tab) that are not
mandatory to grab here.

9 years agoAdwaita: more flexible headerbar_fill mixin
Lapo Calamandrei [Thu, 5 May 2016 16:36:03 +0000 (18:36 +0200)]
Adwaita: more flexible headerbar_fill mixin

add an additional background layer as a parameter.

9 years agosearchenginetracker: Quote fts match so it's seen as a single phrase
Carlos Garnacho [Wed, 4 May 2016 12:23:17 +0000 (14:23 +0200)]
searchenginetracker: Quote fts match so it's seen as a single phrase

FTS5 has a complex enough syntax that it makes not much sense to wrap
in simple search boxes.

https://bugzilla.gnome.org/show_bug.cgi?id=765981

9 years agolabel: Also initialize text
Timm Bäder [Thu, 5 May 2016 09:21:56 +0000 (11:21 +0200)]
label: Also initialize text

So gtk_label_get_text returns the default value of "". Broke the
GtkModelButton default value test.

9 years agocssgadget: Remove unused function
Timm Bäder [Thu, 5 May 2016 06:47:40 +0000 (08:47 +0200)]
cssgadget: Remove unused function

9 years agogtkrender: Remove superfluous cairo_save/restore calls
Timm Bäder [Wed, 4 May 2016 20:24:52 +0000 (22:24 +0200)]
gtkrender: Remove superfluous cairo_save/restore calls

These were all surrounding functions that either call
cairo_save/cairo_restore themselves or don't need to.

9 years agocss node: Stop extraneous change notification
Matthias Clasen [Wed, 4 May 2016 20:05:40 +0000 (16:05 -0400)]
css node: Stop extraneous change notification

The ::name and ::widget-type properties are entirely independent,
no need to notify both when either changes.

9 years agobox: Only emit ::child-notify when necessary
Matthias Clasen [Wed, 4 May 2016 19:05:08 +0000 (15:05 -0400)]
box: Only emit ::child-notify when necessary

We can easily check if the values for expand, padding and so forth
actually changed, so lets do it.

9 years agoRevert "When creating a widget path, use the widget type"
Matthias Clasen [Wed, 4 May 2016 17:52:09 +0000 (13:52 -0400)]
Revert "When creating a widget path, use the widget type"

This reverts commit 0d78b67bca8866a05d0d55d3d5c48aa7a90ff89e.

As Benjamin points out: that'll break all widgets that query style
properties in their init function.

9 years agoWhen creating a widget path, use the widget type
Matthias Clasen [Wed, 4 May 2016 17:41:05 +0000 (13:41 -0400)]
When creating a widget path, use the widget type

No need to pull the type out of the css node - its our own type.
This will let us stop setting the type on the css node later on.

9 years agoSet the proper state on the css node
Matthias Clasen [Wed, 4 May 2016 17:38:47 +0000 (13:38 -0400)]
Set the proper state on the css node

This will almost certainly overwritten before the widget gets
to the screen, but while we are doing this, we might as well
use the same state that we initialize the widgets state to.

9 years agocss names are always set
Matthias Clasen [Wed, 4 May 2016 16:48:46 +0000 (12:48 -0400)]
css names are always set

No need to check for it, we set the css name on GtkWidgetClass
ourselves.

9 years agoswitch: Remove .slider from slider gadget
Timm Bäder [Wed, 4 May 2016 16:55:33 +0000 (18:55 +0200)]
switch: Remove .slider from slider gadget

As the documentation states, neither the switch nor the slider gadget
should be using any style classes.

9 years agoswitch: Create less pango layouts
Timm Bäder [Wed, 4 May 2016 13:25:59 +0000 (15:25 +0200)]
switch: Create less pango layouts

Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.

9 years agosettings: Fix xsettings handling
Matthias Clasen [Wed, 4 May 2016 15:19:03 +0000 (11:19 -0400)]
settings: Fix xsettings handling

I was somehow under the misconception that we'd get GdkEventSettings
events for all the xsettings at startup. That is not in general true,
so we need to make sure that we check for the xsettings value before
we use them, or derived fields. Update all the private getters to
do so; and fix settings_update_font_values() to cope with font
descriptions that might miss the family or size.

9 years agosettings: Ensure derived fields are initialized
Matthias Clasen [Wed, 4 May 2016 10:28:59 +0000 (06:28 -0400)]
settings: Ensure derived fields are initialized

I mistakenly assumed that gtk_settings_init was already doing
something to trigger a notify for all properties. It doesn't,
so we have to ensure that settings_update_font_values() is
called at least once.

https://bugzilla.gnome.org/show_bug.cgi?id=765966

9 years agowayland: Small improvements to update_direction
Matthias Clasen [Wed, 4 May 2016 03:14:05 +0000 (23:14 -0400)]
wayland: Small improvements to update_direction

Avoid memory allocation if possible, and use the proper
min/max keycodes.

9 years agowayland: Don't emit direction-changed unless it did
Matthias Clasen [Wed, 4 May 2016 02:52:38 +0000 (22:52 -0400)]
wayland: Don't emit direction-changed unless it did

We can easily check this, so lets do it.

9 years agotrivial formatting fixes
Matthias Clasen [Wed, 4 May 2016 02:36:20 +0000 (22:36 -0400)]
trivial formatting fixes

9 years agoUse g_set_object in one more place
Matthias Clasen [Wed, 4 May 2016 02:15:17 +0000 (22:15 -0400)]
Use g_set_object in one more place

9 years agolabel: don't use set_text in gtk_label_new
Timm Bäder [Tue, 3 May 2016 23:26:02 +0000 (19:26 -0400)]
label: don't use set_text in gtk_label_new

It would just set up lots of things with the default values, but a
common case is that a few gtk_label_set_* calls follow.

9 years agoUpdated Norwegian bokmål translation.
Kjartan Maraas [Tue, 3 May 2016 21:23:11 +0000 (23:23 +0200)]
Updated Norwegian bokmål translation.

9 years agolabel: minimum/natural size parameters are not nullable
Timm Bäder [Tue, 3 May 2016 20:07:50 +0000 (16:07 -0400)]
label: minimum/natural size parameters are not nullable

Stop comparing them to NULL.

9 years agolabel: Don't set out parameters twice
Timm Bäder [Tue, 3 May 2016 20:04:58 +0000 (16:04 -0400)]
label: Don't set out parameters twice

We set them later again when we calculate the vertical size, so just
move the general assignment to -1 into the horizontal branch.

9 years agowidget: Remove useless NULL check
Timm Bäder [Tue, 3 May 2016 15:49:20 +0000 (17:49 +0200)]
widget: Remove useless NULL check

We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.

9 years agoroundedbox: Initialize the hashtable key before using it
Timm Bäder [Tue, 3 May 2016 14:58:02 +0000 (10:58 -0400)]
roundedbox: Initialize the hashtable key before using it

In mem_hash, we are iterating over the individual bytes of the key, so
make sure all of it is initialized.

9 years agocssimagebuiltin: Remove icons that don't draw anything anymore
Benjamin Otte [Tue, 3 May 2016 10:57:50 +0000 (12:57 +0200)]
cssimagebuiltin: Remove icons that don't draw anything anymore

9 years agocssimagebuiltin: Remove unused variables
Benjamin Otte [Mon, 2 May 2016 17:51:41 +0000 (19:51 +0200)]
cssimagebuiltin: Remove unused variables

9 years agowidget: Remove useless comment
Benjamin Otte [Mon, 2 May 2016 16:36:06 +0000 (18:36 +0200)]
widget: Remove useless comment

9 years agowayland: fix up/down mix up in discrete events
Olivier Fourdan [Tue, 3 May 2016 08:44:16 +0000 (10:44 +0200)]
wayland: fix up/down mix up in discrete events

The wayland specification for discrete step information for scroll and
other axes reads:

| The discrete value carries the directional information. e.g. a
| value of -2 is two steps towards the negative direction of this axis.

mutter sets a value of 1 for SCROLL_DOWN events and -1 for SCROLL_UP
events.

gdkdevice Wayland backend does the opposite, it translates a positive
discrete value as SCROLL_UP and a negative value as SCROLL_DOWN, which
ends up inverting the scrolling direction.

Fix the logic in gdkdevice Wayland to use a positive value as
SCROLL_DOWN and a negative value as SCROLL_UP so that it matches mutter
and weston logic.

https://bugzilla.gnome.org/show_bug.cgi?id=765907

9 years agocss: Stop drawing double borders for builtins
Matthias Clasen [Mon, 2 May 2016 17:30:20 +0000 (13:30 -0400)]
css: Stop drawing double borders for builtins

The fallback code for rendering builtin checks, radios
and expanders was using border parameters. With the generic
gadget borders using the same parameters, this was giving
double borders.